//
// ComputedJob.java : each ComputedJob is a (a,n,result)   record
//
package server;
import java.io.Serializable;
import java.math.BigInteger;

public class ComputedJob implements Serializable {
    private static final long serialVersionUID = 237L;	
    public BigInteger c_a;
    public BigInteger c_n;
    public boolean c_result;
    
    public ComputedJob(BigInteger c_a, BigInteger c_n, boolean c_result){
        this.c_a = c_a;
        this.c_n =c_n;
        this.c_result = c_result;
    }
    
    public boolean equals(ComputedJob job) {
        if ( job.c_a.equals(this.c_a)
          && job.c_n.equals(this.c_n)
          && job.c_result == this.c_result ) {
              return true;
          } else {
              return false;
          }
    }
    
    public int hashCode() {
        return (((this.c_n.mod(this.c_a)).hashCode()) * (this.c_result ? (1) : (-1)));
    }
}
